package org.jeecg.common.util.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum DataSourcesTypeEnum {
    /**
     * 1：本系统用户， 2：OA同步用户
     */

    LOCAL (1, "本系统用户"),
    OA(2,"OA同步用户");

    int status;
    String name;

    public static String getName(Integer status){
        if (status == null){
            return null;
        }
        for (DataSourcesTypeEnum mode : DataSourcesTypeEnum.values()){
            if (mode.getStatus() == status.intValue()) {
                return mode.name;
            }
        }
        return null;
    }
}
